###################################################################### Product:      KnowledgeEngine (Plone Edition)## File:         SimpleReport.py## Copyright:    Copyright (c) 2004, Faulkner Technologies## Author:       Brian Oliver## Description:  This file defines the SimpleReport class, a simple#               report that uses the model component reporting#               attributes to build a report## See Also:     GenericObject, Component, Model, Section#####################################################################
####################################################################### Knowledge Engine Library Importsfrom Products.KnowledgeEngine.Common import *from Products.KnowledgeEngine.Core import *from Products.KnowledgeEngine.SingleAssessmentReport import SingleAssessmentReport, SingleAssessmentReportInfofrom Products.KnowledgeEngine.PropertyDefinition import *from Products.KnowledgeEngine.PropertyTypes import *from Products.KnowledgeEngine.PropertyFormats import *from Products.KnowledgeEngine.PropertyStructures import *from Products.KnowledgeEngine.EventDefinition import *
####################################################################### Zope Library Importsfrom Globals import DTMLFilefrom ImageFile import ImageFile
####################################################################### Python Library Imports# (none)
####################################################################### SimpleReportInfo Class Definitionclass SimpleReportInfo(SingleAssessmentReportInfo):    """        Defines the class info methods, defining information about        the class without needing an instance of the class    """        #---------------------------------------------------------------#        def getClassName(self):        """            Returns the name of the class for which             we are providing information.        """        return 'SimpleReport'
    #---------------------------------------------------------------#
    def getDisplayName(self):        """            Return a friendly name for the class instances            (this is used for displaying in lists etc)        """            return "Simple Report"            #---------------------------------------------------------------#
    def getIdentityType(self):        """            Return the identity type.          """                return "simplereport"            #---------------------------------------------------------------#        def getClassIcon(self):        """            Return the appropriate icon file for the class.        """                return ImageFile('skins/SimpleReport_icon.gif', globals())        #---------------------------------------------------------------#
    def onConfigureProperties(self):        """            Automatically called by the Knowledge Engine once            the class has been loaded.  Use this method to register             class specific properties using the PropertyReflection interface.                        If this class is sub-classed, a call must be made to            the super-class to ensure super-class properties are            correctly registered                        NOTE: This method is called before ClassInfo.onAfterStartup()                    """
        #initialise the super-class properties for reflection        SingleAssessmentReportInfo.onConfigureProperties(self)        #---------------------------------------------------------------#
    def onConfigureEvents(self):        """            Automatically called by the Knowledge Engine once            the class has been loaded.  Use this method to register             class specific events using the EventReflection interface.                        If this class is sub-classed, a call must be made to            the super-class to ensure super-class properties are            correctly registered                        NOTE: This method is called before ClassInfo.onAfterStartup()                    """                        #initialise the super-class events for reflection        SingleAssessmentReportInfo.onConfigureEvents(self)
    #---------------------------------------------------------------#
####################################################################### SimpleReport Class Definitionclass SimpleReport(SingleAssessmentReport):    """        A class to represent a simple report that uses the components        within the containing Model to build a report    """
    #---------------------------------------------------------------#
    #ABSTRACT TRANSIENT: a ClassInfo implementation instance to provide info about this class    _CLASSINFO = SimpleReportInfo()
    #---------------------------------------------------------------#
    def __init__(self, id, identity):        "Constructor for the object"        
        SingleAssessmentReport.__init__(self, id, identity)            #---------------------------------------------------------------#
####################################################################### Class Initialisation
# Register Class Information with the Knowledge EngineregisterGenericObjectClass(SimpleReport)
#####################################################################
